<?php
require_once("./DButil.php");

$videoId=$_REQUEST["id"];
$status=$_REQUEST["status"];

$sql="update t_video set status={$status} where videoId={$videoId}";

$add=update($sql);
if ($add) {
    $result = [
        "msg" => "修改成功",
        "code" => 200,
        "success" => true
    ];
}else{
    $result = [
        "msg" => "修改失败",
        "code" => 400,
        "success" => false
    ];
}


header("Content-Type:application/json;charset=utf-8");
echo json_encode($result);
?>